var student = 'lee'
student.age = '26'
console.log(student.age) // undefined 虽然不会报错，但是添加不成功
var person = new Object()
person.name = 'hh'
console.log(person.name) // hh 添加属性成功
var num1 = 5
var num2 = num1
// 对num2 做出修改再看下num1有没有受到影响
num2 = 6
console.log(num1) // 5 没有改变。说明基本数据类型的复制不会相互影响
var object1 = {
  age: '26'
}
var object2 = object1
// 对object2做出修改，看object1有没有变化
object2.age = '23'
console.log(object1.age) // 23
function addTen(num) {
  num = num + 10
  return num
}
var count = 20
var result = addTen(count)
console.log(count) // 20
console.log(result)// 30

function setName (obj) {
  obj.name = 'aaa'
}
var person = new Object()
setName(person)
console.log(person.name) // aaa

function setName2 (obj) {
  obj.name = 'bbb'
  obj = new Object()
  obj.name = 'cccc'
}
var p = new Object()
setName2(p)
console.log(p.name) // bbb


